import { createSlice } from "@reduxjs/toolkit";

const userSlice = createSlice({
  name: "user",
  initialState: {
    updateVisible: false,
    userObj: {},
  },
  reducers: {
    setUpdateVisible(state, action) {
      state.updateVisible = action.payload;
    },
    setUserObj(state, action){
        state.userObj=action.payload;
    }
  },
});

export const { setUpdateVisible ,setUserObj} = userSlice.actions;
export default userSlice.reducer;
